package com.lr.cloudstudy.controller;

import com.lr.cloudstudy.entities.CommonResult;
import com.lr.cloudstudy.service.PaymentFeignService;
import com.lr.cloudstudy.service.T;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@Slf4j
public class OrderController {

    @Autowired
    PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult getPayment(@PathVariable("id") Long id) {
        return paymentFeignService.getPayment(id);
    }

    @GetMapping("/consumer/payment/timeout")
    public String timeout() {
        return paymentFeignService.timeout();
    }
}
